import java.util.ArrayList;
import java.util.List;

public class Student {
    String studentId;
    String name;
    String contact;
    private List<Course> registeredCourses;

    public Student(String studentId, String name, String contact) {
        this.studentId = studentId;
        this.name = name;
        this.contact = contact;
        this.registeredCourses = new ArrayList<>();
    }

    public void registerCourse(Course course) {
        registeredCourses.add(course);
    }

    @Override
    public String toString() {
        return "学生 ID: " + studentId + ", 姓名: " + name + ", 联系方式: " + contact;
    }
}
